﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>周边炉投入铝汤 - 列表</title>
    <link rel="stylesheet" href="../../css/base.css" />
    <link rel="stylesheet" href="../../css/index.css" />
    <style type="text/css">
        html, body {
            background: #fff;
        }
    </style>
</head>
<body>
    <div class="header">
        机边炉加入铝汤记录
    </div>
    <div class="list">
        <table cellspacing="0" cellpadding="0" border="0">
            <thead><tr><th>时间</th><th>机边熔化保温炉</th><th>汤包</th><th>压铸产品</th><th>转运操作工</th></tr></thead>
            <tbody id="tbody"></tbody>
        </table>
    </div>
    <script type="text/plain" id="texts">
        <tr>
            <td><div class="ikd_cbConl">_FDate_</div></td>
            <td><div class="ikd_cbConl">_FJBLNumber_</div></td>
            <td><div class="ikd_cbConl">_FTBNumber_</div></td>
            <td><div class="ikd_cbConl">_FProNumber_</div></td>
            <td><div class="ikd_cbConl">_FEmplNameZY_</div></td>
        </tr>
    </script>
    <script src="../../script/base/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../script/layer/layer.js"></script>
    <script src="../../script/api.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../script/base/H.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../script/DbHelper.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        var page = 1;
        var state = true;
        apiready = function () {
            data();

            api.addEventListener({
                name: 'scrolltobottom',
                extra: {
                    threshold: 50            //设置距离底部多少距离时触发，默认值为0，数字类型
                }
            }, function (ret, err) {
                if (state == false) {
                    db.Ts.toast('暂无更多', 2000, 'x'); return;
                }
                page = page + 1;
                data();
                // 加载下一页的数据，然后向现有页面追加数据。
            });
        }

        //加载数据
        function data() {
            db.ajax(function (ret, err) {
                var data = eval('(' + ret + ')');
                if (db.Data.JsonGet(data, "status", "") == "200") {
                    //没数据直接结束
                    if (data.msg.ds.length <= 0) {
                        db.Ts.toast('暂无更多', 2000, 'x');
                        state = false;//无数据
                        return;
                    }

                    var texts = $("#texts").html();
                    var htmls = "";
                    for (var i = 0; i < data.msg.ds.length; i++) {
                        htmls += texts.replace(/_FJBLNumber_/g, '' + data.msg.ds[i].JBL)
                            .replace(/_FTBNumber_/g, '' + data.msg.ds[i].TB)
                            .replace(/_FDate_/g, '' + data.msg.ds[i].FDate.substring(0, 10) + " " + data.msg.ds[i].FDate.substring(11, 19))//
                            .replace(/_FProNumber_/g, '' + data.msg.ds[i].CP)
                            .replace(/_FEmplNameZY_/g, '' + data.msg.ds[i].FEmplNameZYName);
                    }
                    $("#tbody").append(htmls);
                } else {
                    db.Ts.toast('网络异常请稍后重试...', 2000, 'x');
                }
            }, "tourulvtanglist", "post", {
                    pageindexInt: 1, BLCompanyID: db.getCurrentUser().quyuId
                }, { title: '读取中', text: '请耐心等待...' });

        }

            //查看详情
            //		function chakan(id){
            //			db.Jianting.set("zblgetinfo",{ids:id});
            //			setTimeout(function(){
            //				api.closeWin();
            //			},200);
            //		}
    </script>
</body>
</html>